<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let data = {
            message:'测试数据'
        }
        Object.defineProperty(data,'message',{
           get(){
               console.log('get...')
               return '测试数据'
           },
           set(newValue){
                console.log('set...',newValue)
           }
        })


        data.message = '测试数据2'
        // delete data.message
        console.log(data)
        for(let i in data){
            console.log(i)
        }
    </script>
</body>
</html>